import java.util.Scanner;

public class h_39 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("输入一个数：");
        int n=sc.nextInt();
        double sum=0;
        if(n%2==0){
            for(int i=0;i<n/2;i++){
                sum=sum+(double)1/((i+1)*2);
            }
        }else {
            for(int i=0;i<(n+1)/2;i++){
                sum=sum+(double)1/(2*i-1);
            }
        }
        System.out.println(sum);
    }
}
